import request from '@/utils/request';
import { ResponseData,LoginParams } from './type';


//项目用户相关的请求地址
enum API {
  LOGIN_URL = "/login",
  USERS_URL = "/users",
}

//用户登陆
export const loginApi = (data: LoginParams) => {
  return request.post<LoginParams, ResponseData>(API.LOGIN_URL, data);
};


// 获取用户列表
export const getUsers = () => {
  return request.get<any,ResponseData>(API.USERS_URL);
};

//查询用户
export const queryUser = (id: number | string) => {
  return request.get<any,ResponseData>(API.USERS_URL , { params: { id } });
};

